﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Liya.Crm.IService;
using Liya.Crm.Data.Models;
using Liya.Crm.Data;

namespace Liya.Crm.Service
{
    public class UserInfo:IUserInfo
    {
        public Sys_UserInfo UserLogin(string userName, string password)
        {
            Sys_UserInfo userInfo = null;
            using (var repository = new Repository<Sys_UserInfo>())
            {
                userInfo = repository.Get(p => p.UUserName.Equals(userName) && p.UPassword.Equals(password)).FirstOrDefault();
            }
            return userInfo;
        }
    }
}
